Skip to content

feat: pre-release update channel + automated pre-releases from main - #159

Merged
its-mash merged 1 commit into
mainfrom
feat/prerelease-update-channel
Jun 15, 2026
Merged

feat: pre-release update channel + automated pre-releases from main#159
its-mash merged 1 commit into
mainfrom
feat/prerelease-update-channel

Conversation

@its-mash

Copy link
Copy Markdown
Member

What & why

Adds a Pre-release update channel so every change merged to main is automatically shipped as a signed pre-release, and users can opt into early builds from Settings → Software Updates. The normal stable flow (release-please) is unchanged. See radiant-enchanting-sundae plan.

How it works

  • Channel delivery via a header, not a Rust rewrite. Tauri can't template a channel into a static endpoint URL and JS check() can't set endpoints, so the app sends X-Mcpmux-Channel: stable|prerelease and a resolver at api.mcpmux.com/v1/update/latest.json returns the matching release's latest.json. This keeps the proven JS check/install path 100% intact (a broken updater can't fix itself) and yields per-channel update analytics. The GitHub /releases/latest URL stays as a fallback endpoint, so stable updates keep working even if the resolver is down or not yet deployed.
  • Per-version pre-releases X.Y.Z-pre.<run_number>, where X.Y.Z is release-please's pending next version (read from its bot-branch manifest). SemVer ordering holds: 0.3.0 < 0.4.0-pre.318 < 0.4.0.
  • Promote = both paths. Primary: merge the release-please PR (clean stable cut). Escape hatch: promote.yml rebuilds a chosen -pre.N commit as signed stable.
  • release-please stays the changelog/version source of truth (manifest mode → v*-pre.* tags don't interfere).

Changes

App

  • commands/settings.rs: get_update_channel / set_update_channel (key updates.channel, default stable) + unit tests; registered in lib.rs.
  • lib/updates.ts: channel helper that sends the header; wired into both check() sites (App.tsx launch auto-check, UpdateChecker.tsx manual).
  • UpdateChecker.tsx: Stable / Pre-release selector.
  • tauri.conf.json: resolver endpoint + GitHub stable fallback.

CI

  • release.yml: gated prerelease jobs (pre-create draft → build by id → publish) — race-free, like the stable flow.
  • build-tauri.yml: reusable build shared by stable / pre-release / promote.
  • promote.yml: workflow_dispatch promote-by-tag.
  • scripts/set-version.mjs: stamps the version onto the 3 release-please-tracked files.

Tests / validation

  • cargo clippy --workspace -- -D warnings, cargo fmt --check
  • ✅ Rust unit tests (commands::settings, incl. new normalize_channel)
  • pnpm typecheck, ESLint (0 errors), full TS suite (197 + 7 new)
  • ✅ Workflow YAML parses; job graph verified

Companion PR (separate repo)

The resolver route (GET /v1/update/latest.json) ships in mcpmux.serverhub.api. After merging it: deploy the worker and wrangler secret put GITHUB_TOKEN (recommended for API rate limits). Until then, the fallback endpoint serves stable.

Every merge to main now publishes a signed pre-release (X.Y.Z-pre.<run_number>),
and users can switch the update channel to Pre-release in Settings → Software
Updates. Channel selection rides an X-Mcpmux-Channel header resolved by
api.mcpmux.com/v1/update/latest.json, keeping the proven JS check/install flow
untouched; the GitHub stable URL stays as a fallback endpoint.

- settings: get_update_channel / set_update_channel commands (+ unit tests)
- ui: Stable / Pre-release selector; both check() sites send the channel header
- ci: gated prerelease jobs (pre-create draft -> build by id -> publish),
  reusable build-tauri.yml, promote.yml escape hatch, scripts/set-version.mjs
- release-please remains the stable changelog/version source (manifest mode,
  so the v*-pre.* tags don't interfere)

The Cloudflare Worker resolver ships separately in mcpmux.serverhub.api.

Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
@its-mash
its-mash merged commit e9306c4 into main Jun 15, 2026
13 checks passed
@its-mash
its-mash deleted the feat/prerelease-update-channel branch June 15, 2026 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant